package encrypt;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test4 {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1,2,3,4,5,6,7,8);
        list.stream().filter(e -> {
            System.out.println(e);
            return e > 4;
        }).collect(Collectors.toList()).forEach(System.out::println);
    }
}
